/**
 * @file GetProfileHandler.cs
 * @author Zane Mayo
 * @date 26/5/2009
 */

using System;

namespace MxitAPI {
	
	
	public class GetProfileHandler : Handler {
		
		private static log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod().DeclaringType );
		
		
		public GetProfileHandler() : base( typeof( GetProfileProtocolMessage ) )  {
			
		}
		
		protected override void HandleSpecificResponseProtocolMessage ( ProtocolMessage protocolMessage ) {
			UserProfile userProfile = UserProfile.Instance;
			GetProfileProtocolMessage getProfileProtocolMessage = ( GetProfileProtocolMessage ) protocolMessage;
			
			userProfile.Name = getProfileProtocolMessage.Name;
			userProfile.LoginNameHidden = getProfileProtocolMessage.LoginNameHidden;
			userProfile.DateOfBirth = getProfileProtocolMessage.DateOfBirth;
			userProfile.Gender = getProfileProtocolMessage.Gender;
            
		}

		
	}
}